export enum RecurringBuyOrigins {
  BUY_CONFIRMATION = 'BUY_CONFIRMATION',
  COIN_PAGE = 'COIN_PAGE',
  CURRENCY_PAGE = 'CURRENCY_PAGE',
  DASHBOARD_PROMO = 'DASHBOARD_PROMO',
  DETAILS_SCREEN = 'DETAILS_SCREEN',
  RECURRING_BUYS_BANNER = 'RECURRING_BUYS_BANNER',
  RECURRING_BUYS_FREQUENCY_SCREEN = 'RECURRING_BUYS_FREQUENCY_SCREEN',
  SIMPLE_BUY_FREQUENCY_SCREEN = 'SIMPLE_BUY_FREQUENCY_SCREEN',
  SIMPLE_BUY_ORDER_SUMMARY = 'SIMPLE_BUY_ORDER_SUMMARY'
}

export enum ModalName {
  ACTIVE_REWARDS_MODAL = 'ACTIVE_REWARDS_MODAL',
  ADD_BANK_PLAID_MODAL = 'ADD_BANK_PLAID_MODAL',
  ADD_BANK_YAPILY_MODAL = 'ADD_BANK_YAPILY_MODAL',
  ADD_BANK_YODLEE_MODAL = 'ADD_BANK_YODLEE_MODAL',
  ADD_BTC_WALLET_MODAL = 'ADD_BTC_WALLET_MODAL',
  AIRDROP_CLAIM_MODAL = 'AIRDROP_CLAIM_MODAL',
  AIRDROP_SUCCESS_MODAL = 'AIRDROP_SUCCESS_MODAL',
  AUTO_DISCONNECTION_MODAL = 'AUTO_DISCONNECTION_MODAL',
  BANK_DEPOSIT_MODAL = 'BANK_DEPOSIT_MODAL',
  BANK_DETAILS_MODAL = 'BANK_DETAILS_MODAL',
  BITPAY_INFORMATIONAL_MODAL = 'BITPAY_INFORMATIONAL_MODAL',
  BITPAY_INVOICE_EXPIRED_MODAL = 'BITPAY_INVOICE_EXPIRED_MODAL',
  COMPLETE_USER_PROFILE = 'COMPLETE_USER_PROFILE',
  CONFIRMATION_MODAL = 'CONFIRMATION_MODAL',
  CONFIRM_DISABLE_2FA = 'CONFIRM_DISABLE_2FA',
  COWBOYS_PROMO = 'COWBOYS_PROMO',
  CUSTODY_WITHDRAW_MODAL = 'CUSTODY_WITHDRAW_MODAL',
  CUSTOMIZABLE_CONFIRM_MODAL = 'CUSTOMIZABLE_CONFIRM_MODAL',
  DELETE_ADDRESS_LABEL_MODAL = 'DELETE_ADDRESS_LABEL_MODAL',
  DEX_SWAP_SETTINGS = 'DEX_SWAP_SETTINGS',
  DEX_TOKEN_ALLOWANCE = 'DEX_TOKEN_ALLOWANCE',
  DEX_TOKEN_SELECT = 'DEX_TOKEN_SELECT',
  EARN_COMPARE = 'EARN_COMPARE',
  EARN_ONBOARDING = 'EARN_ONBOARDING',
  EDIT_TX_DESCRIPTION_MODAL = 'EDIT_TX_DESCRIPTION_MODAL',
  ETH_WALLET_BALANCES = 'ETH_WALLET_BALANCES',
  FUNDS_LIST = 'FUNDS_LIST',
  FUND_RECOVERY_MODAL = 'FUND_RECOVERY_MODAL',
  GENERATE_REPORT_MODAL = 'GENERATE_REPORT_MODAL',
  GET_FEATURED = 'GET_FEATURED',
  IMPORT_BTC_ADDRESS_MODAL = 'IMPORT_BTC_ADDRESS_MODAL',
  INTEREST_MODAL = 'INTEREST_MODAL',
  INTEREST_PROMO_MODAL = 'INTEREST_PROMO_MODAL',
  INTEREST_UPLOAD_DOCUMENT_MODAL = 'INTEREST_UPLOAD_DOCUMENT_MODAL',
  KYC_CONSENT_SCREEN = 'KYC_CONSENT_SCREEN',
  KYC_MODAL = 'KYC_MODAL',
  KYC_RESUBMIT_MODAL = 'KYC_RESUBMIT_MODAL',
  KYC_TIER_UPGRADE_MODAL = 'KYC_TIER_UPGRADE_MODAL',
  LINK_FROM_EXCHANGE_ACCOUNT_MODAL = 'LINK_FROM_EXCHANGE_ACCOUNT_MODAL',
  LINK_TO_EXCHANGE_ACCOUNT_MODAL = 'LINK_TO_EXCHANGE_ACCOUNT_MODAL',
  MOBILE_NAV = 'MOBILE_NAV',
  MOBILE_NUMBER_ADD_MODAL = 'MOBILE_NUMBER_ADD_MODAL',
  MOBILE_NUMBER_CHANGE_MODAL = 'MOBILE_NUMBER_CHANGE_MODAL',
  MOBILE_NUMBER_VERIFY_MODAL = 'MOBILE_NUMBER_VERIFY_MODAL',
  NABU_USER_CONFLICT_REDIRECT = 'NABU_USER_CONFLICT_REDIRECT',
  NEW_VERSION_AVAILABLE = 'NEW_VERSION_AVAILABLE',
  NFT_COLLECTION_FILTER = 'NFT_COLLECTION_FILTER',
  NFT_ORDER = 'NFT_ORDER',
  ORDER_MY_CARD_MODAL = 'ORDER_MY_CARD_MODAL',
  PAIRING_CODE_MODAL = 'PAIRING_CODE_MODAL',
  PROMPT_INPUT_MODAL = 'PROMPT_INPUT_MODAL',
  QR_CODE_MODAL = 'QR_CODE_MODAL',
  RECOMMENDED_IMPORTED_SWEEP = 'RECOMMENDED_IMPORTED_SWEEP',
  RECOVERY_PHRASE_MODAL = 'RECOVERY_PHRASE_MODAL',
  RECURRING_BUYS_MODAL = 'RECURRING_BUYS_MODAL',
  REFERRAL_LANDING_MODAL = 'REFERRAL_LANDING_MODAL',
  REMOVE_BANK_MODAL = 'REMOVE_BANK_MODAL',
  REQUEST_CRYPTO_MODAL = 'REQUEST_CRYPTO_MODAL',
  RESET_ACCOUNT_FAILED = 'RESET_ACCOUNT_FAILED',
  RESIDENTIAL_ADDRESS_MODAL = 'RESIDENTIAL_ADDRESS_MODAL',
  SANCTIONS_INFO_MODAL = 'SANCTIONS_INFO_MODAL',
  SECOND_PASSWORD_MODAL = 'SECOND_PASSWORD_MODAL',
  SELECT_ADD_BANK_TYPE = 'SELECT_ADD_BANK_TYPE',
  SELF_ASSESSMENT = 'SELF_ASSESSMENT',
  SELF_CLASSIFICATION = 'SELF_CLASSIFICATION',
  SEND_BCH_MODAL = 'SEND_BCH_MODAL',
  SEND_BTC_MODAL = 'SEND_BTC_MODAL',
  SEND_CRYPTO_MODAL = 'SEND_CRYPTO_MODAL',
  SEND_ETH_MODAL = 'SEND_ETH_MODAL',
  SEND_XLM_CREATE_ACCOUNT_LEARN_MODAL = 'SEND_XLM_CREATE_ACCOUNT_LEARN_MODAL',
  SEND_XLM_MODAL = 'SEND_XLM_MODAL',
  SEND_XLM_RESERVE_LEARN_MODAL = 'SEND_XLM_RESERVE_LEARN_MODAL',
  SHOW_BTC_PRIVATE_KEY_MODAL = 'SHOW_BTC_PRIVATE_KEY_MODAL',
  SHOW_USED_ADDRESS_MODAL = 'SHOW_USED_ADDRESS_MODAL',
  SHOW_XPUB_MODAL = 'SHOW_XPUB_MODAL',
  SIGN_MESSAGE_MODAL = 'SIGN_MESSAGE_MODAL',
  SIMPLE_BUY_MODAL = 'SIMPLE_BUY_MODAL',
  SKIP_TWOFA_CONFIRMATION_WARNING = 'SKIP_TWOFA_CONFIRMATION_WARNING',
  SOFI_BLOCKCHAIN_WELCOME = 'SOFI_BLOCKCHAIN_WELCOME',
  SOFI_MIGRATED_BALANCES = 'SOFI_MIGRATED_BALANCES',
  SOFI_VERIFY_ID = 'SOFI_VERIFY_ID',
  STAKING_MODAL = 'STAKING_MODAL',
  SUPPORT_MODAL = 'SUPPORT_MODAL',
  SWAP_MODAL = 'SWAP_MODAL',
  TERMINATE_CARD = 'TERMINATE_CARD',
  TERMS_AND_CONDITIONS_MODAL = 'TERMS_AND_CONDITIONS_MODAL',
  TRADE_MODAL = 'TRADE_MODAL',
  TRADING_LIMITS_MODAL = 'TRADING_LIMITS_MODAL',
  TRANSACTION_DETAIL_MODAL = 'TRANSACTION_DETAIL_MODAL',
  TRANSACTION_LIST_MODAL = 'TRANSACTION_LIST_MODAL',
  TRANSACTION_REPORT_MODAL = 'TRANSACTION_REPORT_MODAL',
  TRANSFER_ETH_MODAL = 'TRANSFER_ETH_MODAL',
  TWO_STEP_GOOGLE_AUTH_MODAL = 'TWO_STEP_GOOGLE_AUTH_MODAL',
  TWO_STEP_SETUP_MODAL = 'TWO_STEP_SETUP_MODAL',
  TWO_STEP_YUBICO_MODAL = 'TWO_STEP_YUBICO_MODAL',
  UNSUPPORTED_REGION = 'UNSUPPORTED_REGION',
  UPGRADE_ADDRESS_LABELS_MODAL = 'UPGRADE_ADDRESS_LABELS_MODAL',
  UPGRADE_FOR_AIRDROP_MODAL = 'UPGRADE_FOR_AIRDROP_MODAL',
  UPGRADE_NOW_MODAL = 'UPGRADE_NOW_MODAL',
  UPGRADE_NOW_SILVER_MODAL = 'UPGRADE_NOW_SILVER_MODAL',
  US_PATRIOTIC_ACT = 'US_PATRIOTIC_ACT',
  VERIFY_MESSAGE_MODAL = 'VERIFY_MESSAGE_MODAL',
  VERIFY_NOTICE = 'VERIFY_NOTICE',
  VERIFY_NOTICE_MODAL = 'VERIFY_NOTICE_MODAL',
  VIEW_INTEREST_ACCOUNT = 'VIEW_INTEREST_ACCOUNT',
  VIEW_PRIVATE_KEY_WALLET = 'VIEW_PRIVATE_KEY_WALLET',
  VIEW_TRADING_ACCOUNT = 'VIEW_TRADING_ACCOUNT',
  WELCOME_MODAL = 'WELCOME_MODAL'
}

export type ModalNameType = keyof typeof ModalName

export type ModalOriginType =
  | 'AirdropClaimGoal'
  | 'AddBankModal'
  | 'AddBankModalBuy'
  | 'AddBankModalDeposit'
  | 'AddBankModalSettings'
  | 'AddBankModalWithdraw'
  | 'BankDetailsModal'
  | 'BankDeposit'
  | 'CoinPageHoldings'
  | 'CompleteProfileBanner'
  | 'CompleteProfile'
  | 'CowboysCard'
  | 'CowboysSignupModal'
  | 'DebitCard'
  | 'DebitCardDashboard'
  | 'DepositWithdrawalModal'
  | 'Dex'
  | 'EarnPage'
  | 'EmptyFeed'
  | 'ExchangeForm'
  | 'FeaturesTopNav'
  | 'Goals'
  | 'Header'
  | 'InterestUploadDocument'
  | 'KycDocResubmitGoal'
  | 'KycRequiredStep'
  | 'LoginSaga'
  | 'NabuUserAuth'
  | 'Nfts'
  | 'NftsMakeOffer'
  | 'PaymentProtocolGoal'
  | 'PendingOrder'
  | 'PriceChart'
  | 'Prices'
  | 'Request'
  | 'ResetAccount'
  | 'RetrySendEth'
  | 'RecurringBuys'
  | 'RecurringBuyPromo'
  | 'AppleAndGooglePayPromo'
  | 'RunKycGoal'
  | 'BSEnterAmountCheckout'
  | 'BSPaymentMethodSelection'
  | 'SellEmpty'
  | 'Send'
  | 'SendBch'
  | 'SendBtc'
  | 'SendEth'
  | 'SendXlm'
  | 'SettingsGeneral'
  | 'SettingsPage'
  | 'SettingsProfile'
  | 'SideNav'
  | 'BuySellInit'
  | 'BuySellLink'
  | 'BuySellStatus'
  | 'BuySellOrderSummary'
  | 'RecommendedImportedSweep'
  | 'SofiFinishMigration'
  | 'SofiMigration'
  | 'SofiWelcomeGoal'
  | 'Swap'
  | 'SwapPrompt'
  | 'SwapLimitPrompt'
  | 'SwapNoHoldings'
  | 'TheExchangePage'
  | 'Trade'
  | 'TradingLimits'
  | 'TransactionList'
  | 'Unknown'
  | 'WalletBalanceDropdown'
  | 'WelcomeModal'
  | 'WithdrawModal'
  | 'CurrencyList'
  | 'ResidentialAddress'
  | 'VerifyAddress'
  | RecurringBuyOrigins
  | ModalName

export type ModalParamPropsType = {
  [key: string]: any
  origin: ModalOriginType
}

export type ModalType = {
  options: any
  props: ModalParamPropsType
  type: ModalNameType
}

// State
export type ModalsState = Array<ModalType>

export type UpdateModalPayload = {
  options?: any
  props: ModalParamPropsType
  type: ModalNameType
}

export type UpdateModalOptionsPayload = {
  options: any
}
